package com.aaa.daydemo111.demo5;

/**
 * @Description:
 * @author:LiWei
 * @date:2022年11月01日17:37
 */
public class Boy extends Thread {
    @Override
    public void run() {
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        synchronized (LockObject.lock1){
            System.out.println(Thread.currentThread().getName()+"有个画板");
            synchronized (LockObject.lock2){
                System.out.println(Thread.currentThread().getName()+"买了好多材料和笔");
                System.out.println(Thread.currentThread().getName()+"可以开始画画了");
            }
        }
    }
}
